cpuidle: Small fix to urgent_count update logic.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 24 Feb 2010 10:57:24 +0000 (10:57 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 24 Feb 2010 10:57:24 +0000 (10:57 +0000)
From: Ke Yu <ke.yu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/common/schedule.c

index d02eb1f0af8739a9d8465b752c87c9f0c1705cb4..fdb9e8d0d203f726637f3e1613e153a2daeb75b4 100644 (file)
@@ -107,7 +107,8 @@ static inline void vcpu_urgent_count_update(struct vcpu *v)
 
     if ( unlikely(v->is_urgent) )
     {
-        if ( !test_bit(v->vcpu_id, v->domain->poll_mask) )
+        if ( !test_bit(_VPF_blocked, &v->pause_flags) ||
+             !test_bit(v->vcpu_id, v->domain->poll_mask) )
         {
             v->is_urgent = 0;
             atomic_dec(&per_cpu(schedule_data,v->processor).urgent_count);
@@ -115,7 +116,8 @@ static inline void vcpu_urgent_count_update(struct vcpu *v)
     }
     else
     {
-        if ( unlikely(test_bit(v->vcpu_id, v->domain->poll_mask)) )
+        if ( unlikely(test_bit(_VPF_blocked, &v->pause_flags) &&
+                      test_bit(v->vcpu_id, v->domain->poll_mask)) )
         {
             v->is_urgent = 1;
             atomic_inc(&per_cpu(schedule_data,v->processor).urgent_count);